package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallOrderUpdateAddressLog;
import com.sc.nft.mapper.MallOrderUpdateAddressLogMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * @author JYT
 * @create 2024/6/11 14:59
 */
@Slf4j
@Repository
public class MallOrderUpdateAddressLogDao extends ServiceImpl<MallOrderUpdateAddressLogMapper, MallOrderUpdateAddressLog> {
    public Integer countByOrderId(Long orderId) {
        LambdaQueryWrapper<MallOrderUpdateAddressLog> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(MallOrderUpdateAddressLog::getOrderId,orderId);
        return count(queryWrapper);
    }
}
